<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html:xhtml />
<script type="text/javascript">
    $(document).ready(function() {
        // 'DataTablize' the table
        $("#geneTable").dataTable({
            "bPaginate": true,
            "sPaginationType": "full_numbers",
            "bFilter": true,
            "bJQueryUI": true,
            "bAutoWidth": false
        });
    });
</script>
<div id="makePathwayGeneList" class="content list">
    <h2>Make Pathway Gene List</h2>
    <html:form action="makePathway">
        <table id="geneTable" cellpadding="0" cellspacing="0" border="0" class="display">
            <thead>
                <tr>
                    <th>Gene Name</th>
                    <th>DB Gene Name</th>
                    <th>SNPs Genotyped</th>
                </tr>
            </thead>
            <tbody>
                <logic:iterate id="geneInfo" name="makePathwayForm" property="geneList">
                    <tr>
                        <td><bean:write name="geneInfo" property="pathwayGeneName" /></td>
                        <logic:empty name="geneInfo" property="gene">
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                        </logic:empty>
                        <logic:notEmpty name="geneInfo" property="gene">
                            <td><bean:write name="geneInfo" property="gene.name" /></td>
                            <td><bean:write name="geneInfo" property="snpCount" /></td>
                        </logic:notEmpty>
                    </tr>
                </logic:iterate>
            </tbody>
        </table>
        <p><html:submit value="Display Pathway" property="submitType" /></p>
    </html:form>
</div>